<!doctype html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script>
// Note that this tests the fix for this bug:
// rdar://problem/3765519 REGRESSION (Mail): word movement goes too far
// upstream at start of line.
selection_test(
    '<div contenteditable>foo<br>bar ba|z</div>',
    selection => selection.modify('move', 'backward', 'word'),
    '<div contenteditable>foo<br>bar |baz</div>');
selection_test(
    '<div contenteditable>foo<br>bar |baz</div>',
    selection => selection.modify('move', 'backward', 'word'),
    '<div contenteditable>foo<br>|bar baz</div>');
</script>
